import 'package:fluro/fluro.dart';
import 'package:flutter/material.dart';
import 'package:hao_ke/consts/consts.dart';
import 'package:hao_ke/pages/auth/auth.dart';
import 'package:hao_ke/routes/routes.dart';
import 'package:scoped_model/scoped_model.dart';

class App extends StatelessWidget {
  App({super.key});

  @override
  Widget build(BuildContext context) {
    FluroRouter router = FluroRouter();
    Routes.configRoutes(router);
    // 登录状态共享
    return ScopedModel<AuthModel>(
      model: AuthModel(),
      child: MaterialApp(
        debugShowCheckedModeBanner: false,
        theme: ThemeData(primaryColor: Consts.head_color),
        onGenerateRoute: router.generator,
      ),
    );
  }
}
